<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <button @click="clickBtn">点击显示或者取消</button>
        <hr>
        <h3 v-if="flag">这个是受属性控制的内容</h3>
        <h3 v-show="flag">这个是受v-show控制的内容</h3>
    </div>
</body>
<script src="../lib/vue-2.6.10.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            flag : true,
        },
        methods: {
            clickBtn(){
                this.flag = !this.flag;
            }
        },
    });
</script>

</html>